Copyright: Tommy Anderberg and Polyhedric Software, 1998
Citation: Tommy Anderberg and Polyhedric Software, 1998


Contents
At a glance

•	Introduction

•	Why the name?

•	What's new in this version?

•	Will it run on a 486?

Operations

•	Playing the Mellosoftron live (with an external MIDI controller, the computer keyboard or the mouse)

•	Using the Mellosoftron as a virtual MIDI device (e.g. with a sequencer or with the Windows Media Player)

•	Editing an existing instrument patch (PRG)

•	Creating a new instrument patch (PRG)

•	MIDI Settings and MAPping (MIDI channels to instruments and more)

•	Controlling audio output (latency, sampling rate, number of voices...)

Additional resources

•	How to get more instruments (PRGs and WAVs)

•	How to create your own WAVs

•	How to render MIDI files to WAV using Mellosoftron instruments

Ordering the Mellosoftron

•	Ordering overview

•	Order online

•	Order offline

For developers

•	Use the Mellosoftron engine in your own programs!

Getting tech support

Submit error reports and questions to support@polyhedric.com.

Before sending us a question, please make sure that it isn't answered in this document. Don't forget to use the Find button - it's much faster than an e-mail query. Our own response time depends mainly on the number of redundant questions we have to handle.


Introduction

The Mellosoftron is a low latency, fully programmable virtual sampler created by Tommy Anderberg and brought to you by Polyhedric Software.

In short, it turns your PC into a sampler which you can play live with a MIDI keyboard, with a sequencer or with any MIDI file player. Any 16 bit sound card with a DirectSound 3 (or later) driver will do - you don't need a particular brand or model. You can edit all instrument patches and create new ones from scratch using your own WAVs as sound sources.

Since it comes with an integrated patch editor and uses the same file formats (PRGs and WAVs) as the MIDInight Express and WAVmaker, the Mellosoftron is the ideal tool for the creation of your own instruments. Add the Acid WAV synthesizer and sound editor and you have a virtual recording studio inside your PC!

You can always download the latest versions of the Mellosoftron Evaluation Package and of related software from our site

 www.polyhedric.com/software


Why the name?

The Mellosoftron's name is a tribute to the grandfather of all samplers, the Mellotron.

This venerable ancestor was an electro-mechanical marvel. For each key on the console there was a magnetic tape player. When a key was pressed, the tape started rolling. Upon key release, a spring yanked the tape back (faster than a regular, motor-driven rewind, but still too slow for fast solo playing). Each tape contained a separate, 8-second recording - they had to be that long since no looping was possible with this approach.

The tapes came in racks which could be replaced to change "patches". Unfortunately, every time you did this, you were likely to also have to realign the tape player heads. For live performances, the Mellotron was therefore in practice a mono-timbral machine.

In spite of these limitations, the Mellotron's polyphony made it a succes. It was the first keyboard capable of producing complicated chords with realistic-sounding ensemble instruments, in an age when electronic synthesizers where essentially monophonic beasts and digital samplers were unheard of. It was eventually pushed out of the market with the advent of electronic machines such as the ARP String Ensamble.

If you want to hear a Mellotron in action, listen to the chords in Jean Michel Jarre's first LPs, Oxygene (1976) and Equinoxe (1977).

The Mellosoftron can do a whole lot more than the old Mellotron - in fact, it could easily emulate one, given enough RAM - but version 1.x shared the latency problem which made its electro-machanical ancestor unsuitable for fast solos. This echo of the past has faded away with the Mellosoftron II, but the name has stuck.


What's new in this version?

Apart from several minor changes to the user interface, version 2.5 adds...

•	An improved PRG editor. Envelopes are now displayed graphically and can be edited both numerically and visually. The envelope graph shares a tabbed control with the comment box. A window splitter allows you to allocate screen space to data grid and envelope graph / comment box according to your needs.

•	An improved WAV viewer. You can now play the WAV and test / edit your loop points directly in the viewer, without switching back and forth between viewer and PRG editor and without having to Apply the modified PRG. Loop points are now automatically marked in the WAV viewer when it's opened; marked start and end points are no longer unmarked when zooming horizontally, and they can can be exported (either as Start sample / End sample or as Loop start sample / Loop end sample) without having to switch back to the PRG editor. There is also a new button to set horizontal zoom to 1 (displaying the entire WAV) with one click. Also, the WAV display has been enlarged.

•	A 31% discount when ordered as part of the WAVmaker Plus or WAVmaker Studio packages!


Will it run on a 486?

In principle, yes. In practice, a 486 is too slow for the Mellosoftron. You need at least a Pentium 90 to run it, and an even faster CPU (at least a Pentium 133 is recommended) for reliable low latency operation. Please note that Pentium clones from Cyrix and AMD tend to suffer from slower FPU (Floating Poiunt Unit) operation, which is crucial to the Mellosoftron's performance.


About Tommy Anderberg
Tommy Anderberg is the creator of several popular audio tools

for MS Windows (Acid WAV, MIDInight Express, Virtual Sampler

SDK, WAVmaker). A physicist by training and a computer geek

by vocation, he is also a consultant and a prolific freelance writer

on personal computing and the Internet.

Tommy can be reached at

Tommy.Anderberg@polyhedric.com


Other titles from Polyhedric Software

For the latest information on titles published by Polyhedric Software, please visit our web site at

www.polyhedric.com/software

Current titles of interest to users of the Mellosoftron include:

•	The Acid WAV sound editor and synthesizer. The best tool for recording, synthesizing, editing and compressing WAVs!

•	The WAVmaker CD+ quality MIDI to WAV renderer featuring programmable effect lines, tune tables, the GSound 44 instrument library and much more!

•	The MIDInight Express wavetable-based MIDI player and MIDI to WAV renderer. An ideal companion for the Mellosoftron - and FREEWARE!

•	The GSound 22 CD-ROM: a complete General MIDI and GS sound library for the Mellosoftron and the MIDInight Express.

•	The Virtual Sampler SDK. A Software Developer's Kit which lets programmers use the Mellosoftron's low latency wavetable engine in their own projects.

We also undertake custom software design and development on a contract basis. You are always welcome to contact us at consulting@polyhedric.com to discuss your custom development needs.


About Acid WAV

Acid WAV is an advanced sound editor and synthesizer. Unlike older (and more expensive) sound editors, it has been designed from the ground up to take full advantage of Microsoft's 32 bit Windows architecture.

An unparalleled set of powerful synthesis and editing functions combined with an intuitive, friendly user interface make Acid WAV a must-try (and a must have!) - words just won't make it justice! Grab the free Acid WAV Evaluation Package at our site

 www.polyhedric.com/software

and see for yourself!

The screen shots below show just a few of Acid WAV's windows. Download the Evaluation Package to explore them all!

Main window

Convolution filter

Virtual room

Frequency envelope

FM synth

Analog synth

Equalizer

Spectrum

Script editor

Acid WAV is only $30 when ordered with the Mellosoftron as part of the WAVmaker Studio package!

Other titles from Polyhedric Software...


Main window


Convolution filter


Virtual room


Frequency envelope


FM synth


Analog synth


Equalizer


Spectrum


Script editor


About the MIDInight Express

The MIDInight Express is a free, programmable, software wavetable MIDI player and MIDI to WAV renderer which uses the same instrument file (PRG and WAV) format used by the Mellosoftron.

Unlike the Mellosoftron, the MIDInight Express doesn't require (but nevertheless supports) DirectSound and a fast CPU. In fact, it will even run on a low end 486 PC. Any entry-level 16 bit sound card, or even the simple sound circuits found in most laptops, will do just fine.

You can use the MIDInight Express...

•	As a standalone MIDI player

•	As a fast MIDI to WAV renderer

•	As a better WAV player

And it's easy, too! If you have ever used a CD player, you will feel right at home with the MIDInight Express II's user interface:

If you need CD+ quality MIDI to WAV rendering with advanced features like programmable effects and tune tables, check out WAVmaker!

Other titles from Polyhedric Software...


As a standalone MIDI player
If you are tired of listening to your MIDI files as rendered by the toy FM synth chips found on Sound Blaster-compatible sound cards and in most laptops, the MIDInight Express is for you! Pop the GSound 22 CD-ROM into your PC, set the MIDInight Express playing, and enjoy!


As a fast MIDI to WAV renderer
Sometimes you need to create a song on WAV format for a web page, a program, or a multimedia application.

The MIDInight Express offers the fastest route - just click the record button and play your MIDI file(s) as usual! In most cases, the result will sound much better than recording off your sound card while playing.

This function is also useful for listening to MIDI files which are too complicated for real time rendering on your current hardware (too little free RAM to hold all samples, causing the disk swapper to kick in, or too slow a CPU). Note that the MIDInight Express can play WAVs, too.

A tip for all webmasters:  Acid WAV is not only the perfect tool for recording, synthesizing and editing sound; it's also great for compressing WAVs created with the MIDInight Express before posting them on the web, e.g. in MPEG format.

If you need CD+ quality MIDI to WAV rendering with advanced features like programmable effects and tune tables, check out WAVmaker!


As a better WAV player
An auxiliary function of the MIDInight Express is the ability to play WAV files using the standard Media Control Interface (MCI). On most systems, it will do a better job than the Windows 95 media player (which tries to load the whole WAV before playing it, bringing the whole system to a virtual standstill when there isn't enough free memory).


About WAVmaker

WAVmaker is the undisputed leader in MIDI to WAV rendering. Unlike sound cards and soft synths like the Mellosoftron and the MIDInight Express, which are constrained by the requirements of real time operation within a limited memory and CPU footprint, WAVmaker turns MIDI files of virtually unlimited polyphony and complexity into CD-quality WAVs with perfect timing precision, using fully editable instrument patches and samples of virtually unlimited size, without the noise and distortion introduced by conventional recording.

The WAVs produced are ready to be burnt on CD, uploaded to a website or processed further (e.g. mixed with recorded vocals).

Version III is a quantum leap in WAVmaker's development. The program has been completely rewritten to take full advantage of current state of the art PC multimedia technology. New features include:

•	New, higher precision rendering kernel

•	Programmable, MIDI-controlled effect chains

•	User-definable tune tables

•	Automatic volume optimization

•	Batch rendering

•	Wider target sampling rate range

•	Improved MIDI reporting and editing

•	Integration with the Acid WAV sound editor and synthesizer

•	Integration with the Mellosoftron

•	New, Explorer-style user interface

Last but not least, WAVmaker now comes with the GSound 44 General MIDI and GS instrument library: a CD-ROM with full, ready-to-use, MIDInight Express- and Mellosoftron-compatible GM and GS sets consisting of 3+ MB PRG patches and 261+ MB 44.1 kHz, 16 bit WAV samples!

The Mellosoftron is only $20 when ordered as part of the WAVmaker Plus or WAVmaker Studio packages!

Other titles from Polyhedric Software...


New, higher precision rendering kernel
Advances in CPU performance have finally made the use of floating point arithmetic for the entire rendering process a practical proposition. All internal operations are now performed in 32 bit precision or higher, for a signal to noise ratio of no less than 192.6 dB. The results are reduced to (and optimized for) standard 16 bit (CD / DAT) sample size in a second pass, after the final mixdown has been created.


Programmable, MIDI-controlled effect chains
Each MIDI track and channel can be assigned its own MIDI-controlled effect chain with the following architecture:

The chorus / flange, echo and reverb units are all programmable.

This means that you can have a different effect chain for each track and channel. Hardware sound modules typically give you a single, shared effect chain and only let you vary the wet mix level individually for each channel.

Chorus / flange, echo and reverb patches are easily created, edited and tested using the dedicated Acid WAV editor and synthesizer (included!). Import / export of Acid WAV effect patches is done at the click of a button.

All effects can be turned off if you prefer a dry mix (e.g. when rendering individual tracks for manual processing).


User-definable tune tables
Tired of that old Western-style tuning? Feel like experimenting with microtonal composition? No problem: each MIDI track and channel can be assigned its own individual tune table. WAVmaker comes with several predefined ones and gives you full liberty to create your own tunings.


Automatic volume optimization
The two-pass approach used by the new rendering kernel means that overall volume no longer needs to be adjusted manually: the resulting WAVs are automatically optimized for the target 16 bit dynamic range.


Batch rendering
Using WAVmaker has never been easier: all you have to do is collect the MIDs and RMIs to render in a list, click the magic button and watch WAVmaker launch a separate rendering process. You are then free to terminate the main program. This minimizes WAVmaker's footprint while rendering. You can also collect a new bunch of MIDI files to render with different settings and launch another job while the first one is still running. There is no limit to the number of jobs you can have running in parallel (other than available memory etc.). This feature is particularly useful if you have multiple CPUs.


Wider target sampling rate range
Supported target sampling rates range semi-continuosly (i.e. in increments of 1 Hz) from 8000 Hz (phone quality, used e.g. in Unix AU files) to 48 kHz (DAT quality).


Improved MIDI reporting and editing
WAVmaker now comes with a dedicated MIDI reporting and editing "wizard". The new tool analyzes the contents of a MIDI file and lets you edit its individual tracks and channels. You can delete selected kinds of events; map GS banks, programs and controllers to each other; scale and offset continuous values; and transpose note ranges. The result can be saved to any of the supported MIDI formats: Standard MIDI Level 0, Standard MIDI Level 1, RIFF MIDI Level 0 and RIFF MIDI Level 1.


Integration with the Acid WAV sound editor and synthesizer
Acid WAV doesn't only serve as WAVmaker's effect patch editor: it also replaces the auxiliary sound editing functions found in WAVmaker 1.x and 2.x.

That's right, you now get Acid WAV with WAVmaker!

To make a good story even better, you can choose the level of bundling that suits you best. WAVmaker's Standard license covers Acid WAV's recording, encoding, decoding and basic editing functions. Advanced users can take advantage of the Studio license to get all of Acid WAV's features.


Integration with the Mellosoftron
Since WAVmaker now fully supports Mellosoftron 2.x patches, there is no longer any need for a built-in patch editor. Using the Mellosoftron makes life a lot easier by allowing patches to be modified and tried out immediately, live at your keyboard. Again, you can choose the level of bundling that suits you best: if you are not interested in creating your own instruments, it's enough to get a Standard license; otherwise, you can choose between the WAVmaker Plus license (which includes the Mellosoftron) and the WAVmaker Studio license (which adds Acid WAV's advanced sound editing and synthesis functions).


New, Explorer-style user interface
WAVmaker's user interface has been completely redesigned to present you with a greatly simplified, familiar environment. Windows integration has also been improved with the addition of drag & drop (both internally and from the Windows Explorer) and of Open / Play buttons which rely on your system settings to launch the appropriate viewer / player (e.g. a MIDI sequencer or the Windows Media Player).


About GSound 22
Other titles from Polyhedric Software...

The GSound 22 CD-ROM is only $29...

...or $20 if ordered together with the Mellosoftron!

We burn your GSound 22 CD-R when we receive your order. Keeping no stock allows us to minimize costs and guarantees that you always get the most recent version of all files.

•	To submit your order online, you need a credit card. A secure form is available for browsers supporting SSL (e.g. newer versions of Netscape Navigator and Internet Explorer). Data entered on the secure form is encrypted before it's sent over the Internet.

Click here to submit your order online.

•	To submit your order by e-mail, fax or snail mail, you need to run Kagi's "Register" wizard. It will prompt you for all the necessary information and encode any credit card data for better security.

Click here to submit your order by e-mail, fax or snail mail.

If Windows Help complains about not being able to find Register.EXE, you can launch it from the Mellosoftron's folder (click the icon labeled "Order").

Please direct any questions about ordering our products to sales@polyhedric.com.


About the Virtual Sampler SDK

The Mellosoftron is a simple GUI built on top of the Virtual Sampler Library (TM). All the MIDI to digital audio functionality - from loading PRGs and WAVs to interpreting and acting on MIDI messages -  is provided by the Virtual Sampler Library.

As a developer using the Virtual Sampler Library, you deal with a simple API emulating a real sampler. You control it using standard MIDI messages, with one difference - there are 65536 channels to choose from, not 16! The difference between MIDI and digital audio ceases to exist, and you can use the same tool for everything from music  - with predicatble results, independent of the end user's MIDI hardware - to sound effects. The Virtual Sampler Library coexists happily with straight DirectSound code, too (but chances are that you will not see any reason to deal with the latter).

The full Virtual Sampler Library API counts only 27 functions, most of them used to (optionally) set parameters such as the latency and the current WAV directory. Only a third of them are required to build a full application. This simplicity, the use of the well-known MIDI standard, and the availability of powerful PRG and WAV tools like the Mellosoftron and Acid WAV all make using the Virtual Sampler Library a breeze.

The Virtual Sampler SDK contains the documentation and code needed to use the Virtual Sampler Library in your own programs. It also includes the Mellosoftron for quick sound patch creation and editing.

The following 32 bit development environments are currently supported by the Virtual Sampler SDK: Watcom C/C++, MS Visual C/C++, Borland C++ Builder, Borland Delphi, MS Visual Basic.

A fully functional demo is available for download from our site,

 www.polyhedric.com/software

Other titles from Polyhedric Software...


Playing the Mellosoftron live

Before you can do any playing, you must load a PRG (instrument patch file).

Assuming that you have done so, there are three ways to actually play the Mellosoftron live:

•	With a MIDI keyboard (or other MIDI controller) hooked up to your PC's MIDI In port.

•	With the mouse.

•	With the computer's alphanumeric keyboard.

One method doesn't exclude the other - you can use all three at the same time.


Loading an instrument patch (PRG)

You load individual PRGs by assigning them to pads (you can also load entire instrument groups using MAPs).

To start with, locate a pad with no PRG assigned to it (grayed out). If all pads are taken, just pick one and click its Clear button. This causes the PRG on that pad to be unloaded. For instance, if pad 0 is active, it will look like this:

Clicking its Clear button will cause it to take on this look:

The Clear button has turned into a Load button. Click it! You will be presented with a standard Open File dialog giving you a view of the current PRG directory:

Select a PRG file and click Open! The instrument patch will be loaded and the pad will be activated. (If the pad is not activated, there was something wrong with the patch - start by checking that the current WAV directory contains the WAVs referenced in the PRG which you tried to load. PRGs are just formatted text files, so you can browse them with any text editor, like Notepad).

You can also drag a PRG file e.g. from Windows Explorer and drop it on the main window. It will be assigned to the first free pad.

If you place the mouse cursor over an activated pad and leave it there for a moment, a hint will pop up, reporting the name of the loaded PRG (the .PRG extension is always implied). Click the pad to hear it play note c4!

Another way to find out which PRG you have assigned to a pad is to click the radio button in the pad's upper left corner. This selects the pad as the one being controlled by the computer keyboard and mouse (and by MIDI, if the Omni box is checked). Look at the caption of the box at the bottom of the main window! Here, we have assigned 48.PRG to the selected pad:

Clicking the radio button in the pad's upper left corner is not the only way to select it. You can also use the arrow buttons in the main window's bottom box to step between pads. The box caption will change accordingly.


About instrument pads
The Mellosoftron's main window is dominated by the Instruments box, containing 16 large buttons arranged in four rows and labeled 0 through F (you may recognize that as hexadecimal notation for the numbers 0 through 15). These buttons are referred to as pads:

Clicking a pad causes a note (c4) to be played with the instrument patch (PRG) assigned to it.

A pad with no PRG assigned to it is grayed out, and clicking it has no effect:


About PRGs

The Mellosoftron needs two kinds of files to fully describe an instrument: PRGs and WAVs.

PRGs do not contain any sound data. The actual samples are kept in WAV files. PRGs assign WAV files to keys (notes) and impose performance parameters (base volume and pan position, controller sensitivities, envelope shape, loop points...). Each key on the 128-note virtual "keyboard" described by a PRG file can have its own individual sample file(s) and performance parameters.

While you can use any text editor to create and modify PRG files, the recommended tool for this task is the Mellosoftron's dedicated PRG editor.

The Mellosoftron wants all the PRGs needed to handle MIDI Program Change events to reside in a common directory, so it's a good idea to organize your PRGs in "libraries", with each library corresponding to a separate directory.

Click the button labeled PRGs (in the main window's Settings box) in order to change the current PRG directory (double-click the new directory, then click Select).

Note that the Mellosoftron will allow you to give a PRG any valid filename, not just one adhering to the MIDInight Express and WAVmaker convention based on MIDI program and bank numbers. If you want to create a "Killer Bass 2.PRG", you can - but you won't be able to use it with WAVmaker and with the MIDInight Express.

As of version 2.1, the Mellosoftron also allows you to use full WAV paths in PRGs (normally, WAVs are supposed to reside in the current WAV directory). This feature has been added upon the request of some users, but its use is not recommended. A PRG containing a full WAV path is totally dependent on your system's directory structure to function properly. It will most probably not work on other machines (so you can't exchange such patches with other users) and will "break" on your own system as soon as you start moving WAV files or directories around.


About WAVs

The Mellosoftron needs two kinds of files to fully describe an instrument: PRGs and WAVs.

WAV files contain the actual sound data (samples) referred to by PRG instrument definitions. Like the MIDInight Express, the Mellosoftron will handle any combination of mono and stereo, 8 or 16 bits/sample and sampling rates other than the standard 11025, 22050 and 44100 Hz. Note however that WAVmaker requires sample rates of 44100 Hz or higher.

Up to and including version 2.0, all WAVs referred to by a PRG had to reside in a common directory. This is still the recommended mode of operation. Click the button labeled WAVs (in the main window's Settings box) in order to change the current WAV directory (double-click the new directory, then click Select).

As of version 2.1, the Mellosoftron also allows you to use full WAV paths in PRGs. This feature has been added upon the request of some users, but its use is not recommended. A PRG containing a full WAV path is totally dependent on your system's directory structure to function properly. It will most probably not work on other machines (so you can't exchange such patches with other users) and will "break" on your own system as soon as you start moving WAV files or directories around.


Playing with a MIDI keyboard
There is not much to say about using a MIDI keyboard. It's just like playing an ordinary sampler. Apart from Note On/Note Off events, the Mellosoftron will also read controller (Volume, Pitch Bend, Modulation, Pan Position, Pressure, Expression, Bank Select) and Program Change events.

Note that the MIDI Settings window allows you to map any MIDI channel to any instrument pad. If you have mapped a MIDI channel to an instrument pad with no PRG assigned to it, don't be surprised if you can't hear a thing when playing on that channel! Same goes if you have selected a different MIDI port than the one to which you have hooked up your keyboard.

A more serious, potential source of trouble is that some sound cards and/or drivers can't handle MIDI input and digital audio output at the same time. On such a system, the Mellosoftron will report that MIDI input and/or digital audio output aren't working already at startup, and give you the option to abort execution then and there.

As of version 2.2, the main window sports an Omni box. Checking it causes all incoming MIDI messages to be redirected to the selected pad, independently of the channel on which they originated. You select a pad by clicking the radio button in the pad's upper left corner or using the arrow buttons at the bottom of the main window.


Playing with the mouse
The Mellosoftron allows you to enter notes from an emulated keyboard displayed on the computer screen.  Just click the Keyboard button in the main window to bring it up, and click the "key" you want to play using the Left mouse button. Sustained sounds will keep playing until you release the mouse button.

You can also bring up a window containing volume, pitch bend, modulation and pan position controls by clicking the Sliders button.

Clicking the Keyboard and Sliders buttons a second time closes the windows.

Both the Keyboard and the Sliders windows are modeless, so you can switch freely between them and the main window.

All events generated by the emulated keyboard and sliders are sent to the currently selected instrument pad. You select a pad by clicking the radio button in the pad's upper left corner or using the arrow buttons at the bottom of the main window. The name of the PRG assigned to  the currently selected pad is reported in the caption of the enclosing bottom box.


Playing with the computer keyboard

When the main window, the keyboard window or the sliders window have input focus, you can enter notes from the computer's alphanumeric keyboard.

All events generated this way are sent to the currently selected instrument pad. You select a pad by clicking the radio button in the pad's upper left corner or using the arrow buttons at the bottom of the main window. The name of the PRG assigned to  the currently selected pad is reported in the caption of the enclosing bottom box.

Attack and release velocities are always set to 64.

The following keyboard map is used:


MIDI Program Change events
MIDI Program Change events are interpreted according to the same rules used by the MIDInight Express and WAVmaker: a change to MIDI program number 0 causes 0.PRG to be loaded, unless it occurs on drum channel, in which case D0.PRG is loaded.

Bank Select (Controller 0) messages, i.e. GS variations, are also supported. A filename on the form 78b16.PRG denotes instrument number 78, bank number 16. When a GS variation is requested, the Mellosoftron tries to find the corresponding PRG file; if that fails, the corresponding default (bank 0) PRG is loaded. For instance, failing to find 78b16.PRG would cause 78.PRG to be loaded instead.

Note that Bank Select messages are not acted upon until a Program Change message is received, and remain in force until the channel is reset or a new Bank Select message is received.


Editing an existing instrument patch (PRG)

The instrument patch (PRG) editor is invoked by clicking the Edit button displayed under any active instrument pad:

If all pads are grayed out, you can either load or create a new PRG to edit.

Since PRGs are just structured text files, they can actually be modified using any text editor. Their format is not free though, so you should use a dedicated editor with them unless you have very good reasons not to do so!

The Mellosoftron's PRG editor is modeless, just like the Keyboard and Sliders windows. You can therefore switch freely between it and the main window (and the Keyboard window, and the Sliders window...).

You don't have to content yourself with just one editor window either. All 16 pads can have their own PRG editor  window open at the same time, each one on a different PRG. If you like cluttered screens, here's your chance to party - but try not to go crazy just because you can!

Now for the nitty-gritty...

•	The PRG editor: an anatomy lesson

•	PRG editing step by step


The PRG editor: an anatomy lesson

[Click here for help on editing PRGs.]

The most important part of the PRG editor window is the data display grid. If you have ever used a spreadsheet program, you shouldn't have a problem navigating it using the mouse and/or the keypad. To find out  the meaning of each column, click a cell in it and read the Description below the grid:

The four large buttons placed above the Description line, marked Sample, Controller, Envelope and Positions are a further navigational aid: clicking them scrolls the grid sideways to the first column of their respective data sections.

When the editor is first opened, it reads the PRG file assigned to the pad and puts it into a private edit buffer. None of the changes made to the edit buffer are reflected in the file until you click the Save button. Doing so causes the edit buffer to be checked for correctness and, if no errors are found, to be saved to disk from a standard Save File dialog:

Note that you are free to use any filename, not just the original PRG's. There is therefore no need to overwrite anything when saving.

If there are errors in the edit buffer, the Mellosoftron won't open the Save File dialog. Instead, it will show you the grid location where it got confused and return you to the editor. When this happens, keep in mind that the cell pointed out by the Mellosoftron may or may not be the location of the actual error - especially envelope and loop positions are interrelated, and can be inconsistent for several reasons. If a loop start position trails the loop end position, which one is wrong?

Clicking Reload causes the PRG file to be re-read into the edit buffer. If you do this without saving first, all changes you made to the edit buffer will be lost.

Closing the editor window, on the other had, does not cause the edit buffer to be lost. As long as the pad isn't cleared (by loading a new PRG, for instance), you can resume editing at any time by clicking the pad's Edit button again.

Clicking Apply causes the edit buffer to be checked for correctness and, if no errors are found, to be copied to the pad, allowing you to play the modified PRG as usual. If there are errors, the pad isn't touched. As when saving to disk, you are shown the grid location where the Mellosoftron got confused and returned to the editor.

When the edit buffer is succesfully copied to the pad, you lose the Apply button (after all, you have already applied your changes, so what would you want it for?) and get a Revert button instead:

Clicking Revert switches the pad back to the original PRG and turns Revert back into an Apply button. This makes it easy to toggle back and forth between the original and the edited PRG until you are satisfied that the latter is actually an improvement over the former.

When doing this, you may notice a further advantage (apart from avoiding overwrites) to saving the edited PRG under a new name: the pad's hint field will now reflect whether you are playing the original or the edited patch. If you select the radio button in the pad's upper left corner, you will also see the name of the active PRG in the caption of the main window's bottom box:

Now that you understand the objects surrounding it, you probably want to know the purpose of the tabbed control under the Description field (note the horizontal splitter allowing you to resize the tabbed control and the data grid):

The two tabs let you switch between a graphic envelope display and a comment box, respectively. Both apply to the selected line in the data grid and are updated whenever you select a new line. Note that the selected line is marked by a pointed bracket (>) in the grid's first non-scrolling column:

The envelope display allows you to edit all envelope parameters (Attack, Decay, Sustain slope, Release slope, Attack duration, Decay duration) by dragging the section markers with the mouse. The easiest way to understand how modifying the display affects envelope parameters is to click the Envelope button under the data grid and watch the values in the grid while you move the markers around. You can also edit the values in the grid and watch the envelope display.

Note that the leftmost marker in the envelope display can not be moved, as all envelopes start at zero amplitude, and that the rightmost marker can only be moved vertically, as the time scale is set automatically for you (the sustain and release sections describe slopes, not absolute time and amplitude values - the latter are computed dynamically when each note is played, and depend on the duration and velocity of the note event).

The comment box allows you to view and edit comments to the selected line in the data grid. In a PRG file, all lines starting with a # are comments. The PRG editor displays them separately from the actual data, in the comment box. Data lines preceded by comments are marked with a # in the grid's second non-scrolling column. Editing comments is simply a matter of selecting a line in the grid and typing away in the comment box. Comments are removed by deleting them in their entirety (including any line feeds/carriage returns).

The controls at the top of the PRG editor window perform the following functions:

•	Move up moves the selected line up one position in the grid.

•	Move down moves the selected line down one position in the grid.

•	Insert creates (and selects) a new line in the grid, ABOVE the currently selected line, copying all its contents.

•	Add creates (and selects) a new line in the grid, BELOW the currently selected line, copying all its contents.

•	Delete removes the currently selected line from the grid, and selects the next line (unless you are deleting the grid's bottom line, in which case the line above it is selected). The editor does not allow you to delete all lines in the grid: there must always be at least one line left.

•	Copy to... copies the value in the currently selected cell to the other cells in the same column which satisfy the condition specified in the drop-down menu: the destination cell can be required to be on a line sharing the same base key, the same key, the same WAV and base key or the same WAV and key (the last two are useful when editing layered PRGs). You can also select to copy the value to all cells in the same column.

•	View WAV opens a waveshape window on the sample file referred to by the currently selected grid line. This window is modeless too, so you can move freely between it and the PRG editor (and the main window, and the Keyboard and Sliders windows, and any other waveshape and PRG editor windows...).

While the WAV viewer is open, this button is labeled Import value. It is activated by selecting a cell in one of the following columns (all in the PRG's Envelope section): Attack duration, Decay duration, Start sample, End sample, Loop start sample, Loop end sample.

Selecting a cell in the Start sample or Loop start sample column and clicking Import value  causes the value in the Start edit box of the WAV viewer to be imported (if the WAV viewer is displaying millisecond times, the value is first converted to a sample position). As of version 2.5, start sample and loop start sample values can also be exported from within the WAV viewer without switching back to the PRG editor.

Selecting a cell in the End sample or Loop end sample column and clicking Import value causes the value in the End edit box of the WAV viewer to be imported (also here after a unit conversion from milliseconds to samples, if needed). Old WAVmaker and Mellosoftron users may note that this is a simpification of past behaviour (which was more sophisticated, but apparently also confusing to some). As of version 2.5, end sample and loop end sample values can also be exported from within the WAV viewer without switching back to the PRG editor.

Selecting a cell in the Attack duration or Decay duration columns and clicking Import value causes the difference between the End and Start values in the WAV viewer to be imported (here, a unit conversion to milliseconds will be performed if the WAV viewer is displaying sample positions). Negative values are nulled out. Note that the PRG editor uses integer duration values. All decimals will be rounded off.


PRG editing step by step

The basic layout of PRG files is quite simple. Each line applies to a key range, which may be as wide as the whole keyboard (c0 to g10) or as narrow as a single key. The line assigns a WAV file to the key range and describes how it should be played - which envelope to use, whether (and if so how) to loop it, how to handle controller events and so on.

Keys are described in standard notation: a letter (followed by a "#" for black keys) and an octave number.

Key ranges can overlap. When this happens, pressing a key will cause all WAVs assigned to it to be played together, each one according to the envelope and performance parameters described by its own PRG line.

Synth-heads call this layering. It can be a very powerful technique. Layering slightly detuned WAVs will give you a richer, "fatter" sound. Layering instruments which react differently to MIDI controllers (e.g. attack and release velocity) can yield spectacular dynamic response.

The MIDInight Express has a six-layer limit (no more than six separate PRG lines on each key). The Mellosoftron II and WAVmaker III have no such hard-coded limitation, but the Mellosoftron can still run out of voices - each layer is played by a separate one.

So, how do you create a PRG? That's easy: you copy an existing one - preferably one using the same keyboard mapping - and edit it.

The choice of keyboard mapping should be made as soon as possible, and depends on several considerations. Which samples are available? How large is the patch (with samples) allowed to get? Which programs are you going to use with your new PRG?

Most PRGs in the GSound 22 library and in WAVmaker's GSound 44 library use sample files recorded at f3, f4, f5, f#3, f#4, f#5, and often also at f6 and f#6. All other notes are obtained from these by resampling. The reason for having two adjacent base notes for each sampled octave is essentially mathematical: everything else being equal, resampling by harmonic ratios (such as f to g or f# to g#) yields better sound quality (less distorion) than resampling by inharmonic ratios (such as f to g# or f# to g). For even higher quality, one can use the mapping employed for GSound's acoustic pianos: in this case, the full octave is obtained from d, d#, g# and a, by moving one note up or down from the appropriate base note.

Sound quality and speed are the opposite sides of the same coin. The Mellosoftron and the MIDInight Express use linear interpolation for fast resampling. For them, moving up from the base note (e.g. from c4 to c5) is quite cheap (in terms of CPU time) but leads to quicker deterioration in sound quality. Moving down (as in c4 to c3) is expensive, since more and more data points have to be interpolated between existing ones - moving down by one octave requires an interpolated sample to be computed for each recorded one - but quality doesn't deteriorate as fast.

The simplest option is to work "MOD-style", i.e. sample just one note, like c4, and derive all other notes from it. This only takes one PRG line, in which you declare the Key range to be c0-g10 (more generally, remember that contiguous ranges sharing the same base key and other parameters need not be described key by key). The problem with this approach is that most instruments (especially acoustic ones) do not only vary in pitch but also in timbre (i.e. in waveshape) when played at different notes (just think of an acoustic piano being played at opposite ends of the keyboard). In order to reproduce this kind of behaviour, you'll need to spread out your base keys over a suitable range.

Having said that, in the example below we are nevertheless going to use the trivial mapping with just one base note, since it's sufficient for showing (almost) all the steps involved. Creating additional lines and/or layers is just more of the same.

Our starting point will be the default PRG created by the Mellosoftron's own New buttons.

•	Step 1:	Follow the standard procedure for creating a new PRG.

Use the sample file GM97D6.WAV (included in the Evaluation Package).

We could also have loaded an existing PRG to use as our template. As noted above, this can be a better option when dealing with more complicated keyboard mappings (if there is an adequate PRG to start from, that is!).

•	Step 2:	Click the pad's Edit button.

This causes a PRG editor window to be opened on your new PRG.

•	Step 3:	Edit the comment field.

When the PRG editor starts up, the first data line in the PRG file is automatically selected. The leading comment, i.e. the comment preceding the first data line, is therefore already loaded and ready to be edited in the comment box. Click the Comment tab below the field Description line to bring it up. The Mellosoftron II creates all new PRGs alike, and it's a good idea to replace the default comment ("created by Mellosoftron II") with something more descriptive. This way, there will be no risk of confusion when you return to this file later ("What is this patch for? Do I need to keep it?").

The comment box is just a simple text editor. Click it and enter a suitable blurb, such as

#---------------#

# My first PRG! #

#---------------#

#

The leading #s are mandatory. If you omit them, they will be inserted by the PRG editor when you save the file. The trailing #s are just for looks, and may be left out.

•	Step 4:	Change sample file(s) (if needed).

This step is not actually needed in our example. After all, we are using a single WAV as our sound source, and were therefore able to pick it already when we created the new PRG. But if we were using an old PRG based on different WAVs as a template (in order to inherit its keyboard mapping and/or other properties) this would be an important part of the process.

Depending on your goals and on the file at hand, you may prefer to use a text editor when replacing WAV file references. Remember, PRG files are just structured text files, so they can be edited that way too.

Suppose that you have a PRG referring to a large number of different WAV files. The 6.PRG (Harpsichord) contained in WAVmaker's GMega Sound Library, for instance, refers to WAV files called GM6F3, GM6F#3, and so on. If you want to change those references to (e.g.) the string sample files GM48F3, GM48F#3, ..., you can use a text editor to perform a global search-and-replace operation, from GM6 to GM48, with only a couple of keystrokes. This is also worth keeping in mind when doing other large-scale PRG editing.

On the other hand, the dedicated PRG editor can do some things which a text editor can't do, since it knows the meaning of the data. The Copy to... button can be used to perform selective copy operations to data lines sharing the Same base key or the Same key (useful with layered sounds). It can also do a global copy (click the All radio button).

The WAV directory window can also come in handy. It's brought up by clicking the button displayed in the active WAV file cell and allows you to browse and play the sample files in the WAV directory. Marking a filename and clicking the Select button in this window will cause the filename to be copied into the active WAV file cell.

If you want to add a new line for a new WAV file, you can either use the Add button and then edit the new line or (even faster) drag the WAV file from e.g. Windows Explorer and drop it on the PRG editor.

The End sample value is updated automatically when a WAV refrence is added or changed; the Start sample, Loop start sample and Loop end sample values are reset.

Remember that the WAV file extension is always implied - whether you are editing your PRG with the Mellosoftron's dedicated PRG editor or with a text editor, don't type it in!

•	Step 5:	Find new loop points.

As anybody who has ever been involved with sampling will tell you, this can be a most frustrating task! You need to find two samples with similar (ideally, identical) values, separated in time by a multiple of the sound's wavelength. Since any reasonably interesting sample file will feature large envelope and timbre variations over time, you'll be tempted to use "tight" looping, i.e. to constrain the loop to a small region within which it's relatively easy to find corresponding samples - but if you do this, you'll suppress exactly those variations which make the sound interesting! You may get away with tight looping when the loop is used to extend a low-volume release section, but in most cases, you'll use looping for the sustain section, which is central to how the sound is perceived.

Your best tool in this game is the WAV viewer and its scaling/zooming controls. Here's what you do in a typical looping session:

•	Step 5.1:	In the PRG editor, click the [image] button to open a WAV viewer window.

•	Step 5.2: 	In the WAV viewer, click the 1 button to change the Time zoom to 1.0. This is useful for getting a first impression of the WAV and for identifying promising loop sections.

•	Step 5.3: 	Mark a Start position.

•	Step 5.4: 	Use the crosshair to find a  good fit (same amplitude) at the other end of the loop and mark it as the End position. If you can't find a good fit, go back to Step 5.3 and pick another Start position.

•	Step 5.5: 	Copy the End position to the clipboard by highlighting the contents of the End edit box and pressing Ctrl-C.

•	Step 5.6: 	Click the Start button in the WAV viewer so as to center the display on the start position.

•	Step 5.7: 	Use the Start button and the Time zoom edit box to successively zoom in on a good loop start position. Some people will tell you that zero crossings are good loop points, but peaks and valleys are often better, since they are (near) zero-slope points, i.e. the waveshape is only changing slowly there. As a consequence, you're more likely to find at least one good fit at the opposite end of the loop section if you use peaks and valleys.

•	Step 5.8: 	Mark the final Start position, making sure to align the horizontal line of the cross-hair with the sample value (the vertical position in the graph).

•	Step 5.9: 	If the previous step caused the End position to be lost, paste it back into the End edit box (highlight the contents of the edit box and press Ctrl-P).

•	Step 5.10: 	Click the End button so as to center the display on the End position.

•	Step 5.11:	Try finding the best fit (same amplitude) to the Start sample. Move the End position there.

•	Step 5.12: 	Listen to the loop using the [image] button. Remember to wait long enough for the loop to be traversed a few times over. Adjust the Start and End positions in small steps until there are no audible clicks. If you can't get rid of the clicks, go back to Step 5.4 or (in desperate cases) to Step 5.2.

•	Step 5.13: 	Export the Start and End sample positions from the WAV viewer to the selected line in the PRG editor by clicking [image] and [image].

•	Step 5.14: 	[Multi-line PRGs only] In the PRG editor, use the Copy to... button to update all Loop start sample and Loop end sample entries for the same base key (same WAV and base key if you are layering different WAVs).

•	Step 5.15:	[Multi-line PRGs only] Make sure that the End sample values for the modified lines are equal to or larger than the corresponding Loop end sample values.

•	Step 5.16:	Click [image] to make the modified PRG take effect and check that the loop also sounds right for the resampled notes. If it doesn't, you may want to supply different loop points for the problem notes only (rather than start all over again). Use the Add and Insert buttons to create separate lines for the problem notes, adjust their loop points in small steps, re-Apply and re-check until the clicks are gone.

•	Step 5.17:	Click [image] in the PRG editor window in order to save the new PRG (the file is not saved automatically!).

If you think this is a lot of work, imagine what it was like to create a couple of GS libraries! Anyway, try looping GM97D6. When you get too sick of it all, you can look at 97.PRG for a suggestion.

Cheer up, though. After all, not all sounds need to be looped!

Step 6:	Edit the other performance parameters.

There are quite a few of them, and no real need to go through them all in detail here. You can find out what they do by selecting them and reading the PRG editor's Description line. Experiment a bit and you will understand them in no time at all. A few highlights:

•	Increment the Base volume (the volume at which you want the Mellosoftron to believe that the sound was recorded) in order to have it play back at a lower volume.

•	Increment the Base pan (the stereo pan position at which you want the Mellosoftron to believe that the sound was recorded) in order to have it play back further to the left.

•	Set the Start sample to a value larger than zero if you want to skip a leading section of the WAV file.

•	The End sample can be used to limit the max duration of un-looped sounds. If the sound is looped, End sample must be equal to or larger than Loop end sample.

•	Use the Attack, Decay, Sustain slope, Release slope, Attack duration and Decay duration fields to modify the envelope shape. These should all be fairly intuitive. Note that you can edit the envelope graphically, too.

•	Modify the Attack sens., Pressure sens., Expression sens., Release sens. and Mod. Sens. settings to get more or less dynamic response. Note that negative values are allowed for all but the modulation sensitivity, so you can have (for instance) instruments that are played softer the harder you hit a key! Together with layering, this feature allows you to create instruments with controller-dependent timbre (mix different layers in proportions determined by attack velocity etc.).


The WAV viewer

The WAV viewer is opened from the PRG editor by clicking the View WAV button. It's a modeless window, so you can switch freely between it and the PRG editor.

The waveshape display is politically correct: the left channel is drawn in red and the right channel is drawn in blue. Mono WAVs are displayed in red.

There are several ways to scroll around the WAV file. One is to use the horizontal track bar below the graph. Another one is to use the scroll buttons:

Takes you to the end of the file.

Takes you to the start of the file.

Steps forward by 1/10 of the file size.

Steps back by 1/10 of the file size.

Steps one frame forward.

Steps one frame back.

Centers the horizontal axis.

You can also center the display on the position shown in the Start and End edit boxes by clicking the corresponding buttons.

The frame width can be changed using the Time zoom edit box. A zoom value of 1.0 will cause the whole file to be displayed. The quickest way to enter a unit time zoom factor is to click the 1 button next to the edit box.

You can also edit the vertical Amplitude zoom factor, and scroll vertically with the track bar next to  the scroll buttons. An amplitude zoom factor 1.0 causes the full dynamic range (-128 to 127 for 8 bit files, -32768 to 32767 for 16 bit files) to be displayed.

The original zoom settings can be restored by clicking the Reset button. Note that this button becomes a Stop button during redraw, allowing you to abort it at any time.

When no position is marked in the graph, pressing [image] causes the WAV to be played in its entirety. Playback is terminated as soon as the button is depressed or when the end of the file is reached, whichever occurs first.

In order to mark a position in the graph, simply click there. This will cause several things to happen:

•	A cross-hair will appear, originating at the selected position. The horizontal line is especially useful when looking for loop points of equal amplitude to be used in the PRG editor:

•	The graph cursor changes from a cross to a horizontal, bidirectional arrow (a "resize" cursor).

•	The End button is activated, and the current (horizontal) cursor position is now reflected in the End edit box.

•	The contents of the Start edit box are frozen, reflecting the cross-hair's horizontal position. You can reposition the cross-hair by editing the value in this edit box, and force the display to be centered on it by clicking the Start button.

•	A start marker appears above the graph. You can reposition the cross-hair by dragging the marker with the mouse.

When a start position (but no end position) is marked in the graph, pressing [image] causes the WAV to be played from the start position. Playback is terminated as soon as the button is depressed or when the end of the file is reached, whichever occurs first.

•	In order to remove the cross-hair, click the mouse in a position preceding it, anywhere in the graph. Clicking the Reset button will also remove the cross-hair.

•	In order to select a range, click the mouse in a position subsequent to the cross-hair, anywhere in the graph.

When you select a range...

•	The background color in the graphic display, from the cross-hair to the selected end position, is changed to Aqua:

•	The graph cursor changes from a bidirectional arrow to a standard Windows arrow.

•	The contents of the End edit box are frozen, reflecting the horizontal end position of the selected range. You can resize the range by editing the value in this edit box, and force the display to be centered on it by clicking the End button.

•	An end marker appears above the graph. You can resize the range by dragging the marker with the mouse.

•	The Horizontal zoom button is activated. Clicking it will cause the graphic display to be fitted exactly to the selected range. Note that the Reset button becomes a Stop button during redraw, allowing you to abort it at any time.

When a range is selected, pressing [image] causes the WAV to be played in an endless loop from the start position to the end position. Playback is terminated when the button is depressed. Use this feature to quickly locate and test loop positions for your PRGs.

In order to unselect a range, click anywhere in the graph, move the end marker in front of the start marker or click the Reset button.

Note that you can always use the arrow buttons next to the Start and End edit boxes to export sample positions to the currently selected grid line in the PRG editor:

Exports the value in the Start edit box to the Start sample cell of the selected line in the PRG editor.

Exports the value in the End edit box to the End sample cell of the selected line in the PRG editor.

Exports the value in the Start edit box to the Loop start sample cell of the selected line in the PRG editor.

Exports the value in the End edit box to the Loop end sample cell of the selected line in the PRG editor.


Creating a new instrument patch (PRG)

New instrument patches (PRGs) are created by clicking the New button displayed under instrument pads with no patch assigned to them:

If all pads are taken, just pick one and click its Clear button:

This causes the PRG on that pad to be unloaded.

Pick a free instrument pad and click its New button. You will be presented with a standard Open File dialog giving you a view of the current WAV directory:

Select a WAV file and click Open! The Mellosoftron will check the WAV header and, provided that no problem is found with it, display the current PRG directory in a Save File dialog prompting you for a name to use for the new PRG. The default name is "NewX", where X is the pad number.

You can also create a new instrument by dragging a WAV file e.g. from Windows Explorer and dropping it on the Mellosoftron's main window. The new instrument will be created on the first free instrument pad.

Here, we are creating a new PRG on instrument pad 0:

Click Save. The new PRG is created and - provided that the WAV loads OK - assigned to the pad, which is then activated.

There - you're done! You can now play and edit your new PRG as usual.


About MAPs

The Mellosoftron's 16 pads allow you to work with up to 16 different instrument patches (PRGs) at the same time. Since you probably don't want to reload a bunch of PRGs manually every time you start the Mellsoftron, it takes care of bookkeeping what's on each pad and lets you load and save MAP files containing this information at the click of a button.

MAPs also contain MIDI MAPping information.

The Mellosoftron looks for and stores MAPs in the default MAP directory. Click the button labeled MAPs (in the main window's Settings box) in order to change it (double-click the new directory, then click Select).

In order to load a MAP, click the button labeled (you guessed!) Load MAP. You will be presented with a standard Open File dialog. Select a MAP file and click Open. The Mellosoftron will read the new instrument assignments and update its pads accordingly. Pads without an instrument assignment in the MAP being read are unaffected.

As of version 2.3, you can also load MAPs by dragging them from e.g. Windows Explorer and dropping them on the Mellosoftron's main window.

Loading a MAP causes it to become the new default MAP, i.e. the MAP which is loaded automatically at the beginning of the next session.

The Merge MAP button allows you to read a MAP file without first clearing the current assignments, and without changing default MAP.

Use the Save MAP button to store MAPping information. The Mellosoftron will ask you if you want to save the current MAP before loading and merging, as well as at shutdown. Saving a MAP causes it to become the new default MAP, just like loading.


MIDI MAPping

Since the Mellosoftron has 16 instrument pads, and 16 also happens to be the number of MIDI channels, it's natural to expect MIDI channel 1 to control pad 0, MIDI channel 2 to control pad 1, and so on.

This is indeed the default situation - but far from the only possibility! The Mellosoftron allows you to map any combination of MIDI channels to any instrument pad, to select active MIDI channels and to treat any MIDI channel as a drum channel. These settings are stored in the same MAP files which also assign instrument patches (PRGs) to pads, allowing you to store and quickly retrieve complete performance setups.

The only piece of MIDI setup information which does not go into MAP files is the MIDI port selection, which is stored separately (in the Mellosoftron's global INI file, ml.ini), so as to avoid unnecessary opening and closing of MIDI ports (after all, you are unlikely to want to use different ports with different performance setups).

In order to change your MIDI setup, click the MIDI button in the Mellosoftron's main window. This brings up the MIDI Settings window.


MIDI Settings

Conceptually, the main portion of the MIDI Settings window is organized as a grid with MIDI channels on the vertical axis and instrument pads on the horizontal axis. In other words, each row corrsponds to a MIDI channel, each column to an instrument pad.

The leftmost box (Receive) allows you to select active channels. Clearing a checkbox causes all incoming MIDI messages on the corresponding channel to be discarded. The All and None buttons allow you to quickly activate and deactivate all channels at once.

The Drums settings determine how MIDI Program Change events are to be handled. Marking a checkbox makes the corresponding MIDI channel a drum channel. The All and None buttons have the same effect as in the Receive box.

You may want to keep in mind that in General MIDI, there is only one drum channel, number 10. This is the default setting.

Changes in the Drums status of a channel are immediately reflected in the associated instrument pads, according to the following rules:

•	If a pad is associated with more than one channel, it is enough for one of of those channels to be a drum channel for the pad to treat all incoming program change messages as drum program changes.

•	When the Drums status of a pad is modified, by either adding the first or removing the last associated drum channel, the pad is cleared. If the name of the PRG being discarded conforms to the WAVmaker/MIDInight Express naming convention based on MIDI program numbers, an attempt is then made to load the corresponding PRG from the alternate set. For instance, 0.PRG would be replaced with D0.PRG (if present in the PRG directory) and vice versa.

The Instruments box in the MIDI Settings window gives you full control over MIDI channel to instrument pad mapping. To associate a channel with a pad, mark the checkbox where the channel row intersects the pad column. The + and - buttons allow you to set or clear whole rows and columns at a time. You also have a Clear button to unmark all checkboxes at once (careful!) and a Diag. button to set all checkboxes on the diagonal.

Note that adding or removing a MIDI channel from a pad can affect its Drums status, as described above. The situations to watch out for are the addition of the first drum channel or the removal of the last one.

The default mapping is the diagonal one: channel 1 maps to pad 0, channel 2 to pad 1 and so on.

Finally, there is a (MIDI input) Port box. Click the list entry for the port which you want to use, then click Select. That's all there is to it - the Mellosoftron starts using the new port immediately. If there is a problem, the Mellosoftron will tell you so and try to revert to the previous port, otherwise it will just keep going without saying a thing.

Unlike all other MIDI settings, the port selection is stored in the Mellosoftron's global INI file (ml.ini) rather than in the current MAP. Loading a new MAP will therefore not affect the selected MIDI port.

The Reset button will do just what it says - resets the MIDI port. This just might come in handy if you experience MIDI-related problems.


Using the Mellosoftron as a virtual MIDI device

There are now several software synthesizers acting as virtual MIDI devices on the market. After installation, they look just like an ordinary MIDI output port connected to an external sound module (to other programs running on the same system, that is).

While this kind of setup makes sense for a "black box" soft synth with a small, proprietary sound library which can (and must!) be kept in memory at all times so as to emulate a low-end General MIDI module, it isn't really adequate for a full-blown, programmable sampler like the Mellosoftron, which you probably don't want to keep up and running at all times.

Having said that, it is nevertheless quite easy to let the Mellosoftron act as a virtual MIDI device serving a sequencer or a MIDI player running on the same system.

The trick is to install one of several freely available virtual MIDI port drivers. Select the virtual port as the Mellosoftron's MIDI input port (in the MIDI Settings window) and as your sequencer's or MIDI player's output port, and you're all set. (In particular, selecting the virtual port in the Media Player's Device | Properties menu will make it the default MIDI device for your entire system).

Unlike the Mellosoftron, such a driver has a negligible memory footprint and will not use up any valuable CPU time while it's idle. You can therefore leave it permanently installed and fire up the Mellosoftron only as needed (needless to say, the Mellosoftron remembers its MIDI settings between sessions).

As for the choice of virtual MIDI port driver, there are several floating around on the Net, but an excellent one is Hubi's MIDI LoopBack Device 2.4 (or later - earlier versions did not work with 32 bit programs like the Mellosoftron) by Hubert Winkler. A painless 43 kB download available at all the large software archives (SimTel, WinSite etc.), it's not only free - it even comes with full source code! Look for the file mdlpbk24.zip in the Windows 3.x sound areas (it works under Windows 3.1 too, so it's archived there) or at our own Web site,

www.polyhedric.com/software

Unzip into an empty directory, follow the installation instructions in midlpbk.txt and you will have it up and running in no time at all.

A last tip. For the reasons stated above, this is not recommended, but if you really love the Mellosoftron so much that you want to keep it up and running at all times (maybe serving as an emulated General MIDI / GS module) here's how you can do it:

•	Right-click the taskbar's Start button. Click Open.

•	In the Start Menu folder, right-click the Programs folder. Click Open.

•	In the Programs folder, right-click the StartUp folder and (you guessed!) click Open again.  This is your destination - anything in the StartUp folder is executed automatically when Windows is started, and that's what you want to be done with the Mellosoftron.

•	Open a Windows Explorer view on the directory where you installed the Mellosoftron (if you can't remember where that is, run Find from the Start menu and let it look for the file ml.exe). Select the file ml.exe (the main Mellosoftron executable).

•	Drag ml.exe from the Windows Explorer window to the StartUp folder and drop it there.

•	Close all open folders and Windows Explorer.

•	Launch the Mellosoftron. Minimize it.

•	On the taskbar, right-click the Mellosoftron's button (don't restore the Mellosoftron by left-clicking its button - if you do so by mistake, minimize it again and repeat this step). Click Close. The next time it's run, the Mellosoftron will remember that you want it to be minimized.

•	Restart Windows. When the desktop is done repainting itself, you will see the Mellosoftron appear briefly and then minimize itself. This will happen every time you start up Windows, until you drill down to the StartUp folder again and delete the Mellosoftron's shortcut. (Actually, the Mellosoftron will always start up in its last window state, whatever that was - minimized, normal or maximized. If you restore it before shutting it down, the next time it will come up as a normal window. Just minimize and close it again to force it back to minimized operation.)


Controlling audio output

In order to bring up the Audio Settings window, click the Audio button in the Mellosoftron's main window.

Moving up from the lower left corner, the controls in the Audio Settings window perform the following functions:

The Restart button stops and immediately restarts audio output. This is essentially a (very) mild "reset" which you can try using if the sound doesn't come out right after changing some setting.

The OK and ERROR radio buttons report the result of the latest operation. Clicking them has no effect - only the Mellosoftron can change their state.

The Max Latency setting determines how long the Mellosoftron is allowed to take (in milliseconds) before producing an audible result from an event (e.g. a key press). This is a worst-case setting. The actual latency is normally 1/4 of the value given here, so 80 ms corresponds to a normal latency of 20 ms. This is as low as DirectSound will go, and below the human perception limit. The Mellosoftron will take longer only under exceptional circumstance, e.g. CPU load peaks. If such a peak ever introduces a delay longer than the Max Latency setting, the audio stream will break up.

You should touch this value only if you are already hearing breakups and are convinced that the cause is the CPU not keeping up (a good way to find out is to run the Windows System Monitor, Programs | Accessories | System Tools | Sysmon, alongside the Mellosoftron). In this case, raising the Max Latency just might get rid of the breakups, at the cost of responsiveness (higher latency results in lower CPU load). Don't do this just in order to play complex MIDs - it's much better to use the MIDInight Express for that!

You must click the Apply button for a new setting to take effect.

The Voices setting determines how many "oscillators" (monophonic voices) are available. This is not the same as polyphony! The Mellosoftron might have 256 voices but only enough CPU power to play (say) 30 of them at the same time. So why all the "extra" voices? Because voices are not grabbed and released instantly when notes are turned on and off, but rather with a delay ranging up to the Max Latency setting. If this setting is 80 ms, a voice actually producing sound for only 40 ms can therefore remain unavailable to new events for as long as160 ms. This is a worst-case example (CPU just barely keeping up with the load and a VERY short note!) but it illustrates how a few extra voices can come in handy.

This value should probably not be changed at all. Unused voices have a negligible effect on the CPU load and a very modest memory footprint, so there isn't much to be gained from getting rid of them. If you nevertheless want to do so, remember that you must click the Apply button for a new setting to take effect.

The Control Rate is the rate at which envelope factors are updated.

If you don't know what that means, don't worry - you will, once you have edited your first PRG. PRGs (instrument patches) allow you to specify classic ADSR (Attack - Decay - Sustain - Release) envelopes. These are linearly interpolated on the fly to yield actual amplitude factors (since the note duration and other controller values are not known before a note is actually played, envelope factors must be computed at runtime - there just is no alternative).

A higher Control Rate means that the envelope factors are updated more often (which in turn means a higher CPU load). In principle, the Control Rate can be as high as the Output Rate, meaning that envelope factors are recomputed for each sample in the output stream. In most cases, this would be a total waste of CPU time. The default setting of 50 Hz is quite adequate for normal use.

You should only change the Control Rate if you have good reasons to do so (e.g. very steep envelopes applied to very short notes, requiring a higher setting for smooth interpolation). As usual, you must click the Apply button for a new setting to take effect.

The Output Rate is the sampling rate of the audio produced by the Mellosoftron. The default rate of 22050 is the same used by the MIDInight Express, the Roland Virtual Sound Canvas and other soft synths, and adequate for most purposes. You can get a better high-frequency response by raising this value, provided that your instrument samples are sampled at the higher rate too - if not, you are just wasting CPU time. CD quality is 44100 Hz, and the Mellosoftron will go as high as DirectSound will let it, i.e. 100 000 Hz.

Remember that you must click the Apply button for a new setting to take effect.

Last but not least, there is an Audio Device box. Click the list entry for the device which you want to use, then click Select. That's all there is to it - the Mellosoftron starts using the new audio device immediately. If there is a problem, the Mellosoftron will tell you so and try to revert to the previous device, otherwise it will just keep going without saying a thing.

Like the MIDI port selection, the audio device selection is stored in the Mellosoftron's global INI file (ml.ini) rather than in the current MAP. Loading a new MAP will therefore not affect the selected audio device.


License information

Last updated:October 27, 1998

This file contains important license information regarding the distribution and use of the Mellosoftron.

The Mellosoftron is NOT in the public domain. It is Copyright (C) Tommy Anderberg, 1996-1998. All rights reserved worldwide. This software and all the accompanying data and documentation files are protected by national and European laws and by International Treaty provisions. You must treat the Mellosoftron like any other copyrighted material, except that you may copy the Mellosoftron Evaluation Package and give to others (subject to the limitations outlined below). Any use or distribution of this software, data and documentation in violation of Copyright law or of the terms outlined in this document will be prosecuted to the best of our ability.

The conditions under which you may copy and distribute the Mellosoftron are described below under Limited Distribution License Agreement.

The conditions under which you may use the Mellosoftron are described below under Limited User License Agreement.

All rights not expressly granted here are reserved to Tommy Anderberg.

Limited Distribution License Agreement

This Limited Distribution License Agreement (throughout this section, the "Agreement") is a legal agreement between you, the distributor, and Tommy  Anderberg. By copying any part of the Mellosoftron, you are agreeing to be bound by  the terms of this Agreement.

As the copyright and trademark holder for the Mellosoftron, Tommy Anderberg authorizes individuals and organizations to copy the files contained in the Mellosoftron Evaluation Package for their own use or for giving to others, ONLY when the following conditions are met:

•	The Mellosoftron Evaluation Package - including all related program, data and documentation files - may not be modified in any way and must be distributed together, as a complete package, without exception. You may not distribute corrupted or otherwise damaged files.

•	No price or other compensation may be charged for the Mellosoftron Evaluation Package. A reasonable distribution cost may be charged for the distribution media, shipping and handling. BBS systems may not charge beyond their normal rates for downloads of the Mellosoftron Evaluation Package.

•	The Mellosoftron is designed to be easily extended by the addition of instrument patches and samples. You may not, however, distribute an extended version of the Mellosoftron Evaluation Package without prior written permission from Tommy Anderberg.

•	Neither this Agreement nor any part or portion hereof shall be assigned or sublicensed, except as described herein. Should any provision of this Agreement be held to be void, invalid, unenforceable or illegal by a court, the validity and enforceability of the other provisions shall not be affected thereby. If any provision is determined to be unenforceable, you agree to a modification of such provision to provide for enforcement of the provision's intent, to the extent permitted by applicable law. Failure of a party to enforce any provision of this Agreement shall not constitute or be construed as a waiver of such provision or of the right to enforce such provision. If you fail to comply with any terms of this Agreement, your license is automatically terminated, and you may be prosecuted at any time under national and European laws and under International Treaty provisions.

•	You acknowledge that you have read this Agreement, you understand this agreement, and understand that by copying any part of the Mellosoftron, you agree to be bound by this Agreement's terms and conditions. You further agree that, except for written separate agreements between Tommy Anderberg and you, this Agreement is a complete and exclusive statement of your distribution rights. This agreement supersedes all prior oral agreements, proposals or understandings, and any other communications between Tommy Anderberg and you relating to the subject matter of this Agreement.

Limited User License Agreement

This Limited User License Agreement (throughout this section, the "Agreement") is a legal agreement between you, the user, and Tommy Anderberg. By installing the Mellosoftron, by loading or running any part of it, or by placing or copying any part of it onto your computer hard drive, you are agreeing to be bound by the terms of this Agreement.

For the purposes of this section, "use" means loading the software into RAM, as well as installation on a hard disk or other storage device.

 As the copyright and trademark holder for the Mellosoftron, Tommy Anderberg authorizes individuals or organizations to use the Mellosoftron, ONLY when the following conditions are met:

•	You shall not: modify, translate, disassemble, decompile or reverse engineer the compiled executables contained in the Mellosoftron.

•	You may not exploit running copies of the Mellosoftron commercially, e.g. by renting, leasing or selling access to a computer running the Mellosoftron.

•	You may not distribute or otherwise exploit the output produced by the Mellosoftron if you have not purchased your own personal Mellosoftron key from Polyhedric Software.

•	You are free to distribute and exploit the output produced by the Mellosoftron, provided that you have purchased a personal copy of the Mellosoftron, and that the output in question is not part of a competing product (e.g. a sound library for use with the Mellosoftron, the MIDInight Express or WAVmaker), in which case you must have prior written permission from Tommy Anderberg.

•	The user accepts sole and full responsibility for any damage or loss arising from the use or the inability to use the Mellosoftron. While this software has been extensively tested and is believed to be safe, Tommy Anderberg and Polyhedric Software disclaim any warranties, either expressed or implied, including but not limited to warranties of fitness for ANY particular purpose and of uninterrupted, error free operation. Under no circumstances shall Tommy Anderberg or Polyhedric Software be liable for loss of data, loss of profits, lost savings, special, incidental, consequential, indirect or other similar damages arising from the use or the inability to use the Mellosoftron.

•	Neither this Agreement nor any part or portion hereof shall be assigned or sublicensed, except as described herein. Should any provision of this Agreement be held to be void, invalid, unenforceable or illegal by a court, the validity and enforceability of the other provisions shall not be affected thereby. If any provision is determined to be unenforceable, you agree to a modification of such provision to provide for enforcement of the provision's intent, to the extent permitted by applicable law. Failure of a party to enforce any provision of this Agreement shall not constitute or be construed as a waiver of such provision or of the right to enforce such provision. If you fail to comply with any terms of this Agreement, your license is automatically terminated, and you may be prosecuted at any time under national and European laws and under International Treaty provisions.

•	You acknowledge that you have read this Agreement, you understand this Agreement, and understand that by installing any part of the Mellosoftron, by loading or running any part of the Mellosoftron, or by placing or copying any part of the Mellosoftron onto your computer hard drive, you agree to be bound by this Agreement's terms and conditions. You further agree that, except for written separate agreements between Tommy Anderberg and you, this Agreement is a complete and exclusive statement of the rights and liabilities of the parties involved in the use of the Mellosoftron. This agreement supersedes all prior oral agreements, proposals or understandings, and any other communications between Tommy Anderberg and you relating to the subject matter of this Agreement.


Ordering overview

The freely distributable Mellosoftron Evaluation Package lets you try out the program before you decide to purchase a user license.

To permanently unlock the Mellosoftron, you need to get a personal key from Polyhedric Software. The key comes in the form of a small binary file and is delivered either as an e-mail attachment (this is the fastest and least expensive option) or on a standard 3.5 inch diskette (recommended only if you don't have e-mail access or if your e-mail system can't handle binary attachments).

Please refer to the License Agreement for legal details regarding the use and distribution of the Mellosoftron and Mellosoftron keys.

Polyhedric Software is letting Kagi (a specialized order processing firm) handle all orders for Mellosoftron keys. Orders can be submitted to Kagi through an online form, by e-mail, by fax or by snail mail. The online form is the fastest route, snail mail the slowest. Kagi accepts cash (all major currencies), checks, money orders, credit cards (VISA, MasterCard, American Express, Discover or Diners Club), First Virtual and invoices. If you need a paper receipt you can have one sent to you.

A Mellosoftron key is only $29...

...and you can save $9 by ordering it with the GSound 22 CD-ROM or as part

of the WAVmaker Plus or WAVmaker Advanced packages!

•	To submit your order online, you need a credit card. A secure form is available for browsers supporting SSL (e.g. newer versions of Netscape Navigator and Internet Explorer). Data entered on the secure form is encrypted before it's sent over the Internet.

Click here to submit your order online.

•	To submit your order by e-mail, fax or snail mail, you need to run Kagi's "Register" wizard. It will prompt you for all the necessary information and encode any credit card data for better security.

Click here to submit your order by e-mail, fax or snail mail.

If Windows Help complains about not being able to find Register.EXE, you can launch it from the Mellosoftron's folder (click the icon labeled "Order").

Please direct any questions about ordering our products to sales@polyhedric.com.


About Kagi
Kagi

1442 - A Walnut Street #392

Berkeley, CA 94709-1405

USA

Fax: +1 510 652 6589

http://www.kagi.com

kagi@kagi.com


Order online
To order your Mellosoftron key on the web, you need a credit card  (VISA, MasterCard, American Express, Discover or Diners Club). A secure form is available for browsers supporting SSL (e.g. newer versions of Netscape Navigator and Internet Explorer). Data submitted through the secure form is encrypted before it's sent over the Internet.

Click here to submit your order on the web.


Order offline
To order your Mellosoftron key by e-mail, fax or snail mail, you need to run Kagi's "Register" wizard. It will prompt you for all the necessary information and encode any credit card data for better security.

Click here to submit your order by e-mail, fax or snail mail.

If Windows Help complains about not being able to find Register.EXE, you can launch it from the Mellosoftron's folder (click the icon labeled "Order").